#include "newtaskedit.h"

NewTaskEdit::NewTaskEdit(QWidget *parent)
	: QDialog(parent)
{
	ui.setupUi(this);

	connect(ui.btn_ok, SIGNAL(clicked()), this, SLOT(btn_ok_clicked()));
	connect(ui.btn_cancel, SIGNAL(clicked()), this, SLOT(btn_cancel_clicked()));
}

NewTaskEdit::~NewTaskEdit()
{
}


void NewTaskEdit::btn_ok_clicked()
{
	QTime time = ui.choosetime->time();
	int val = time.hour() * 3600 + time.minute() * 60 + time.second();
	emit edit_ok_clicked(val);
}

void NewTaskEdit::btn_cancel_clicked()
{
	emit edit_cancel_clicked();
}